package org.doubango.FrCall.Screens;

import org.doubango.FrCall.Engine;
import org.doubango.FrCall.R;
import org.doubango.FrCall.Services.IScreenService;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;

public class ScreenManageGroup extends BaseScreen {
	
	private static String TAG = ScreenChatSip.class.getCanonicalName();
	private final IScreenService mScreenService;
	
	private Button backToManageFriendSelectViewFromManageGroupView;
	private Button newGroup;
	private ListView groupNameList;
	
	public ScreenManageGroup() {
		super(SCREEN_TYPE.MANAGE_GROUP, TAG);
		mScreenService = ((Engine)Engine.getInstance()).getScreenService();
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.screen_manage_group);
		backToManageFriendSelectViewFromManageGroupView = (Button) findViewById(R.id.back_to_manage_friend_select_view_from_manage_group_view);
		newGroup = (Button) findViewById(R.id.new_group);
		groupNameList = (ListView) findViewById(R.id.group_name_list);
		
		backToManageFriendSelectViewFromManageGroupView.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				mScreenService.show(ScreenManageFriendSelect.class);
			}
		});
		ArrayAdapter<String> groupNameData = new ArrayAdapter<String>(this, R.layout.group_name_list_item, R.id.show_group_name, new String[]{"大学同学","小学同学","好友","发小组","商务组"});
		groupNameList.setAdapter(groupNameData);
	}
	public void renameGroup(View v){
		mScreenService.show(ScreenRenameGroupName.class);
	}
	

}
